<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./css/public.css"/>
    <title>商品购买</title>
    <script src="../baidu.js"></script>
</head>
<body>
    <div class="header">
        <a class="return" href="./index.html"><img src="./css/images/return.png"></a>
        <span class="cont">商品购买</span>
    </div>
    <div>
        <div class="question">
            <div>
                <div class="ques" id="bg1">
                    <div>订单购买未成功怎么办</div>
                    <div><img class="img-icon" src='./css/images/right.png' id="queImg1"></div>
                </div>
                <div class="ans" id='queCon1' style="display:none">订单购买失败，可能是您的账户余额不足，导致订单支付失败；也可能是闪电飞猪缺货导致订单购买失败。</div>
            </div>
            <div>
                <div class="ques"  id="bg2">
                    <div>怎么删除订单</div>
                    <div><img class="img-icon" src='./css/images/right.png' id="queImg2"></div>
                </div>
                <div class="ans" id='queCon2' style="display:none">进入闪电飞猪“我的”页面—“订单管理”可删除订单。如有疑问请您致电咨询。</div>
            </div>
        </div>
    </div>
</body>
<script>
    var queImg1 = document.getElementById('queImg1');
    var queImg2 = document.getElementById('queImg2');

    var queCon1 = document.getElementById('queCon1');
    var queCon2 = document.getElementById('queCon2');
    
    var bg1 = document.getElementById('bg1');
    var bg2 = document.getElementById('bg2');

    var openClose = function(img,con){
        if(con.style.display == "block"){
            con.style.display = "none";
            img.src = "./css/images/right.png";
        }else{
            con.style.display = "block";
            img.src = "./css/images/down.png";
        } 
    }
    bg1.onclick=function(){
        openClose(queImg1,queCon1);
    }
    bg2.onclick=function(){
        openClose(queImg2,queCon2);
    }
</script>
</html>